package com.hlhj.carview.presenter

import android.content.Context
import com.example.mymvp.mvp.BasePresenter
import com.hlhj.carview.Iview.AddEquipmentView
import com.hlhj.carview.bean.MyBaseBean
import com.hlhj.carview.module.AddEquipmentModule

/**
 * Created by Never Fear   on 2018\12\24 0024.
Never More....
 */
class AddEquipmentPresenter :BasePresenter<AddEquipmentModule,AddEquipmentView>(), AddEquipmentView {
    override fun setAddResult(myBaseBean: MyBaseBean) {
        view?.setAddResult(myBaseBean)
    }

    override fun setRepair(myBaseBean: MyBaseBean) {
        view?.setRepair(myBaseBean)
    }

    fun repair(device_id:Int,proposer:String,proposer_phone:String,wechat:String,cause:String,img:String,c:Context){
        module?.repair(device_id, proposer, proposer_phone, wechat, cause, img, c)

    }
    fun addEquipment(name:String, phone:String, wechat:String, c: Context){
        module?.addEquipment(name, phone, wechat, c)
    }
    override fun createModule() {
        module=AddEquipmentModule()
        module?.l=this
    }
}